package com.itheima.demo01;

public class PhoneTest {
    public static void main(String[] args) {
        //空参构造
        //1. 创建phone类的对象.
        Phone iphone = new Phone();
        //2. 给属性赋值
        iphone.setBrand("iphone");
        iphone.setColor("black");
        iphone.setPrice(9999);
        //3. 打印属性值品牌 价格 颜色
        System.out.println("品牌:" + iphone.getBrand() + "价格" + iphone.getColor() + "颜色" + iphone.getPrice());
        //4. 调用成员方法
        iphone.call("比尔盖茨");
        iphone.sendMessage("乔布斯");
        System.out.println("-------------------------");

        //全参构造
        //1. 创建对象
        Phone android = new Phone("Android", 1888, "white");
        //2. 打印属性.
        System.out.println("品牌:" + iphone.getBrand() + "价格" + iphone.getColor() + "颜色" + iphone.getPrice());
        //3. 调用方法
        iphone.call("比尔盖茨");
        iphone.sendMessage("乔布斯");
    }

}
